#define _CRT_SECURE_NO_WARNINGS
#include "StackForTree.h"
int main()
{
	BiTree tree_root = TreeInit();
	int i = 0;
	int ret[100];
	do
	{
		tree_root = Compute();
		if (tree_root)
		{
			ret[i++] = TreeTraverse(tree_root);
		}
	} while (tree_root);
	int j;
	for (j = 0; j < i; j++)
	{
		printf("%d\n", ret[j]);
	}
	return 0;
}
/*
3+(5*2-4/2)=
4+(8/4)=
3/(6*5)=
1*(3-2)=
8*(6/2)=
(8+2*3)/(4-2)=
(5-5*2)+(8/4)=
(6*(3+2)-1)/5=
(2/4+7)*(3-1)=
(8-3*2)/(6/2)=
(5+3*2)-(8/4)=
(2/(4+1))*3=
(4-2*3)+(9/3)=
(8*(2+3)-1)/2=
(6/4+5)*(2-1)=
=
*/